<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <base th:href="@{/}">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/style.css" th:href="@{/css/style.css}"/>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form id="registerForm" th:action="@{/user/register}" th:method="post">
                <h2 class="text-left">用户注册</h2>
                <br>
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" class="form-control" id="username" name="username" required>
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" class="form-control" id="password" name="password" required>
                </div>
                <div class="form-group">
                    <label for="email">邮箱</label>
                    <input type="email" class="form-control" id="email" name="email" required>
                </div>
                <div class="form-group">
                    <label th:text="${errMsg}" class="text-danger"></label>
                </div>
                <button type="submit" class="btn btn-primary btn-block submitBtn">注册</button>
                <br>
                <p class="text-center" style="margin-top: 40px">
                    已有账户？<a th:href="@{/login}">立即登录 ></a>
                </p>
                <hr>
                <div class="text-center">
                    <label for="terms" class="checkbox-inline">
                        <input type="checkbox" id="terms" name="terms" required> 我已阅读并同意服务条款
                    </label>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
</html>